Spreadsheet

Before you insert this applet, make sure that the document you are inserting it in has been saved at least once.

To insert the applet, drag and drop the mouse (8) into a HoTMetaL PRO document. A Design-Time Control window that will allow you to configure the applet will appear. Some spreadsheet operations can be performed when you run the applet.

Spreadsheet applet 8

Overview

This applet displays a simple spreadsheet. You can load the spreadsheet from a URL that points to a data file. the entries in this data file must be comma-separated lists of values; this format can be exported from spreadsheet applications such as Microsoft Excel. Note: At the time of this release, this applet runs only in Netscape Navigator 3.0.

This spreadsheet can execute simple calculations, and also display a chart--a simple graph similar to the one displayed by the Graph applet.

Setting up the spreadsheet

When you drag this applet to the HoTMetaL PRO document, a dialog box (called a Design-Time Control) appears; this enables you to set up the spreadsheet.

The fields in this dialog box should be filled out as follows:

Applet parameters

  • Height and Width specify the amount of space in the main browser window that will be reserved for this applet. Since the spreadsheet is displayed in a separate window, you can set both of these values to 0 (zero) if you like. If you choose positive dimensions, the applet will be displayed as a grey rectangle.
  • Site Root Dir: choose the folder in which the HTML page containing the applet has been saved. (This is necessary if you wish to preview the applet from your local disk.)
  • Use FastLoader: a program that speeds up the loading of the applet. FastLoader is not recommended for this applet

Spreadsheet Parameters

  • Datafile URL: the data file containing the comma-separated lists of values.
  • Grid Color, Background Color, Bar Color: colors for the grid and background.

Click on OK when you have finished the setup. You can display this dialog box again by right-clicking on the applet icon and choosing DTC Properties... from the pop-up menu.

Using the spreadsheet

When the browser opens the page, it automatically loads the applet and displays the graph in a separate window. The initial load time is proportional to the number of cells in the spreadsheet.

Note: You may find it useful to include the instructions below in pages that use this applet.

The spreadsheet has a small menu bar. You can exit the spreadsheet by choosing Exit from the File menu. Commands in the Edit menu enable you to cut, copy, and paste data. Chart... in the View menu lets you display a chart (graph).

Executing formulas

You can execute simple formulas in a cell. The spreadsheet supports the basic arithmetical operators +, -, *, and /. Formulas are evaluated from left-to-right, but you can use parentheses, ( and ), to force a particular order of operations.

A formula starts with an equal sign (=) and can contain numbers and/or cell names. For example:

=7+5
=A2*D3
=B2/10

To execute a formula:

  1. Click on the cell that you want the result to go into.
  2. Enter the formula in the text box below the menu bar.
  3. Press the Enter key.

Displaying a chart

The Spreadsheet applet can display a chart--a simple bar or line graph--in a separate window. The input data for the chart consists of two cell ranges from the spreadsheet that is currently displayed.

To set up the chart, choose Chart... from the spreadsheet's View menu. This displays a dialog box; the fields in this dialog box should be filled out as follows:

  • X-Axis: choose a set of values for the horizontal (X) axis by specifying a start (From) cell and an end (To) cell in the spreadsheet. The cells in this range can contain text and/or numeric values. The cell range should be specified from lowest to highest; for example:
    From: A1
    To: A5
  • Y-Axis: choose a set of values for the vertical (Y) axis by specifying a start (From) cell and an end (To) cell in the spreadsheet. The cells in this range must contain numeric values. The cell range should be specified from lowest to highest.
  • Chart style: the data can be represented by vertical bars or a line that connects the data points.

Click on OK to display the chart.

Java Applets by Mindquake Software Inc.